
public class MyDeadLock {

	private volatile static String monitor;
	
	public static void main(String[] args) {
		synchronized (monitor) {
			mothod1();
		}
	}

	private static void mothod1() {
		synchronized (monitor) {
			System.out.println("Jestem w bloku");
			main(null);
		}
	}
}
